import request from '@/utils/request'

// 工艺卡列表
export const GetListAPI = params => {
  return request({
    url: '/production/processSheet/list',
    method: 'GET',
    params
  })
}

// 新增工艺卡
export const AddDataAPI = data => {
  return request({
    url: '/production/processSheet/add',
    method: 'POST',
    data
  })
}

// 修改工艺卡
export const EditDataAPI = data => {
  return request({
    url: '/production/processSheet/edit',
    method: 'POST',
    data
  })
}

// 删除工艺卡
export const DelDataAPI = data => {
  return request({
    url: '/production/processSheet/delete/' + data,
    method: 'DELETE'
  })
}

// 查看工艺卡
export const GetViewAPI = data => {
  return request({
    url: '/production/processSheet/view/' + data,
    method: 'GET'
  })
}

// 根据线别带出工艺卡参数
export const GetProductionConfigAPI = params => {
  return request({
    url: '/production/processTemplete/getLine',
    method: 'GET',
    params
  })
}

// 根据生产阶别带出线别
export const GetLineSelAPI = params => {
  return request({
    url: '/production/processSheet/getLine',
    method: 'GET',
    params
  })
}

// 根据生产阶别带出工艺流程列表
export const GetProcessAPI = params => {
  return request({
    url: '/production/processSheet/getProcess',
    method: 'GET',
    params
  })
}
